<template>
	<view class="content">
		<view class="app-title ac">
			<view class="fl" @click="back"><image class="back" src="/static/img/back.png"></image></view>设备属性
		</view>
		
		<view class="top-bg"></view>
		
		<view class="detail">
			<u-cell-group class="device-attr">
				<u-cell-item title="设备等级:" value=""></u-cell-item>
				<u-cell-item title="设备型号:" :value="data_list.name == '' ? '请选择' : data_list.sdDbm"></u-cell-item>
				<u-field v-model="data_list.eqtModelNum" label="生产厂家:" placeholder="请填写"></u-field>
				<u-cell-item title="是否电码化:" value="test" :arrow="false"></u-cell-item>
				<u-cell-item title="是否有补偿电容:" value=""></u-cell-item>
				<u-field title="受      辖:" v-model="data_list.name"></u-field>
				<u-cell-item title="所在咽喉:" value="" :arrow="false"></u-cell-item>
				<u-field title="位      置:" v-model="data_list.name"></u-field>
				<u-field title="行      别:" v-model="data_list.name"></u-field>
			</u-cell-group>
			<view class="btn">
				<button class="default-btn">保存</button>
			</view>
		</view>
		
		<view class="full" v-show="show_picker"></view>
		<u-select v-model="show_picker" :list="columns" label-name="text" @confirm="onConfirm" @cancel="onCancel"></u-select>
	</view>
</template>

<script>
export default{
	data() {
		return {
			columns: [],
			data_list:{
				name:'',
				type:'请选择'
			},
			show_picker :false
		}
	},
	methods: {
		back() {
			uni.navigateBack();
		},
		onConfirm(value, index) {
			console.log(`当前值：${value}, 当前索引：${index}`);
			this.onCancel();
		},
		onCancel() {
			this.show_picker = false;
		}
	}
}
</script>

<style scoped>
	.detail>.btn{
		position: absolute;bottom: 3%;left: 0;width: 100%;padding: 0 20px;
	}
	.default-btn{
		width: 98%;margin: 0 auto;
	}
	.long .van-cell__title{
		width: 8.2em!important;
	}
</style>
